package org.jeecg.modules.wlhy.bill.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.wlhy.bill.dto.HyBillDTO;
import org.jeecg.modules.wlhy.bill.dto.HyBillShippingNoteDTO;
import org.jeecg.modules.wlhy.bill.entity.HyBill;
import org.jeecg.modules.wlhy.hydriverbank.entity.HyDriverBank;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.List;

/**
 * @Description: hy_bill
 * @Author: jeecg-boot
 * @Date:   2022-10-28
 * @Version: V1.0
 */
public interface HyBillMapper extends BaseMapper<HyBill> {
    IPage<HyBillDTO> getBillPageList(Page<HyBillDTO> page, @Param(Constants.WRAPPER) QueryWrapper<HyBillDTO> queryWrapper);

    IPage<HyBillDTO> getReqSubFeeShippingPageList(Page<HyBillDTO> page, @Param(Constants.WRAPPER) QueryWrapper<HyBillDTO> queryWrapper, @Param("shippingStatus") String shippingStatus);

    List<HyBill> selectListByIdsForUpdate(@Param("ids") Collection<? extends Serializable> ids);

    BigDecimal getShippingSubFee(@Param("shippingId") String shippingId);

    IPage<HyBillDTO> getPlanFeeReqPageList(Page<HyBillDTO> page, @Param(Constants.WRAPPER)QueryWrapper<HyBillDTO> queryWrapper, @Param("billType")String billType);

    IPage<HyBillShippingNoteDTO> queryBillPageList(Page<HyBillShippingNoteDTO> page,@Param(Constants.WRAPPER) QueryWrapper<HyBillDTO> queryWrapper);

    IPage<HyBillDTO> getPreFeeReqList(Page<HyBillDTO> page, @Param(Constants.WRAPPER)QueryWrapper<HyBillDTO> queryWrapper);

    List<HyBillShippingNoteDTO> getBillShippingNoteList(@Param(Constants.WRAPPER)QueryWrapper<HyBillDTO> queryWrapper);

    HyDriverBank getDriverBankByDriverId(@Param("driverId") String driverId);
}
